<?php
namespace App\Controller\App;

use App\Query\UserQuery;
use App\Query\UserLogQuery;

class UserController extends Controller
{
    // 信息
    public function info()
    {
        return UserQuery::load($this->auth()->model());
    }
    
    // 下级用户列表
    public function list()
    {
        return UserQuery::user($this->auth()->model())->paginate(15)->toArray();
    }
    
    // 日志
    public function log()
    {
        return UserLogQuery::query(
            UserLogQuery::user($this->auth()),
            $this->inputs('type', 'money_type')
        )->paginate(15)->toArray();
    }
}
